package com.test.设计模式.工厂;

public class LetterFactory {
	public static Letter getLetter(String type) {
		Letter letter = null;
		switch (type) {
			case "a":
				letter = new A();
				break;
			case "b":
				letter = new B();
				break;
			default:
				break;
		}
		return letter;
	}
}
